{extend name="public/layout"}
{block name="content"}
<div class="layui-col-md12">
    <div class="layui-card">
        <div class="layui-card-header">
      </div>
        <div class="layui-card-body ">
            <table class="layui-table">
                <tbody>
                    <tr>
                        <th>服务器地址</th>
                        <td>{$req->host()}</td>
                    </tr>
                    <tr>
                        <th>操作系统</th>
                        <td>{:PHP_OS}</td>
                    </tr>
                    <tr>
                        <th>运行环境</th>
                        <td>{$req->server('SERVER_SOFTWARE')}</td>
                    </tr>
                    <tr>
                        <th>PHP版本</th>
                        <td>{:PHP_VERSION}</td>
                    </tr>
                    <tr>
                        <th>PHP运行方式</th>
                        <td>{:php_sapi_name()}</td>
                    </tr>
                    <tr>
                        <th>MYSQL版本</th>
                        <td>{$query->query('select version() as `v`')[0]['v']}</td>
                    </tr>
                    <tr>
                        <th>ThinkPHP</th>
                        <td>{:app()->version()}</td>
                    </tr>
                    <tr>
                        <th>上传附件限制</th>
                        <td>{:ini_get('upload_max_filesize')}</td>
                    </tr>
                    <tr>
                        <th>执行时间限制</th>
                        <td>{:ini_get('max_execution_time')}s</td>
                    </tr>
                    <tr>
                        <th>剩余空间</th>
                        <td>{:getDiskSize()}</td>
                    </tr>
                    <!-- <tr>
                        <th>应用框架</th>
                        <td><a href="http://www.thinkphp.cn/" target=＂_blank＂>ThinkPHP</a></td>
                    </tr> -->
                </tbody>
            </table>
        </div>
    </div>
</div>
{/block}

{block name="foot"}
<script>
(function(){
      $('.layui-table').on('click','.delete-btn',function(){
        var obj = this;
        layer.confirm('确认要删除吗？',function(index){
              //发异步删除数据
              console.log(obj.dataset)
              
              var index = layer.load()
              $.ajax({
                'type':'post',
                'url':obj.dataset.url,
                success:function(data){
                  layer.close(index)
                  layer.alert(data.msg||'服务器出现错误',{icon:data.err_code === 200?6:5,end:function(){
                    if(data.err_code === 200){
                      $($(obj).parents('tr')[0]).remove();
                    }
                  }});
                }
              })
        });
      });
})();

</script>
{/block}